#include<iostream>
using namespace std;
#include<vector>
class Solution {
public:
    long long countCompleteDayPairs(vector<int>& hours) {
        int arr[24] = { 0 };
        long long ans = 0;
        for (auto& e : hours) {
            int now = e % 24;
            ans += arr[(24 - now) % 24];
            ++arr[now];
        }
        return ans;
    }
};